import { FriendModel } from "../../models/friend.js";
var _FriendModel = new FriendModel();

Component({
  properties: {

  },
  data: {
    recommendList:[],
    newList:[],
    indicatorDots: false,
    autoplay: true,
    interval: 5000,
    duration: 1000
  },
  methods: {

  },
  attached(){
    var _self = this;
    var result = [];
    _FriendModel.getRecommendFriends(function(data){
      for (var i = 0; i < data.length; i += 3) {
        result.push(data.slice(i, i + 3));
      }
      _self.setData({
        newList:result
      })
    })


    console.log(result);
  }
})
